package cn.yuanqiao.archive.guidang.enums;

/**
 * 获取案件相关信息枚举
 */
public enum Case {

    DEFAULT("-1") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "";
        }
    },
    AKSCJBXX("akscjbxx") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCJBXX where FOLDER_ID = "+folderId;
        }
    },
    AKSCQFZSCQQK("AKSCQFZSCQQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCQFZSCQQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCBLQK("AKSCBLQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCBLQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCSJQK("AKSCSJQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCSJQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCAJQTYGQK("AKSCAJQTYGQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCAJQTYGQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCDPFZYGQK("AKSCDPFZYGQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCDPFZYGQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCCTCPQK("AKSCCTCPQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCCTCPQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCTCKSQK("AKSCTCKSQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCTCKSQK where FOLDER_ID = "+folderId;
        }
    },
    AKSCTQKSQK("AKSCTQKSQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSCTQKSQK where FOLDER_ID = "+folderId;
        }
    },
    AKSP("AKSP") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKSP where FOLDER_ID = "+folderId;
        }
    },
    AKXS("AKXS") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKXS where FOLDER_ID = "+folderId;
        }
    },
    DSRXX("dsrxx") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_DSRXX where FOLDER_ID = "+folderId;
        }
    },
    AKFZXYR("akfzxyr") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select id,name from "+tenantCode+"_akfzxyr where FOLDER_ID = "+folderId;
        }
    },
    AKFZJBXX("AKFZJBXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZJBXX where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZSAQK("AKFZSAQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZSAQK where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZSJQK("AKFZSJQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZSJQK where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZSJBGQK("AKFZSJBGQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZSJBGQK where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZJYBYXSC("AKFZJYBYXSC") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZJYBYXSC where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZYSCPQK("AKFZYSCPQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZYSCPQK where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKFZESBKTCPQK("AKFZESBKTCPQK") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_AKFZESBKTCPQK where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    AKBHR("akbhr") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select id,name from "+tenantCode+"_akbhr where FOLDER_ID = "+folderId;
        }
    },
    AKBHRXX("akbhrxx") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_akbhrxx where FOLDER_ID = "+folderId+" and bhr_id = "+bhrId;
        }
    },
    BKB("BKB") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_BKB where FOLDER_ID = "+folderId;
        }
    },
    GLNR("GLNR") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select id,name,code from "+tenantCode+"_GLNR";
        }
    },
    GLDZWJGDDJBMLXX("GLDZWJGDDJBMLXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_GLDZWJGDDJBMLXX where FOLDER_ID = "+folderId;
        }
    },
    GLGDYJPZMLXX("GLGDYJPZMLXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_GLGDYJPZMLXX where FOLDER_ID = "+folderId;
        }
    },
    GLXGSPBMLXX("GLXGSPBMLXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_GLXGSPBMLXX where FOLDER_ID = "+folderId;
        }
    },
    GLWJSTXX("GLWJSTXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_GLWJSTXX where FOLDER_ID = "+folderId+" and type = '"+bhrId+"'";
        }
    },
    GLYWGLXX("GLYWGLXX") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_GLYWGLXX where FOLDER_ID = "+folderId+" and type = '"+bhrId+"'";
        }
    },
    DATAHEAD("DATAHEAD") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select * from "+tenantCode+"_DATAHEAD where FOLDER_ID = "+folderId;
        }
    },
    AJXX("ajxx") {
        @Override
        public String getSql(String tenantCode,String folderId,String bhrId) {
            return "select id,name from "+tenantCode+"_akxx where parent_id = 2";
        }
    };


    public abstract String getSql(String tenantCode,String folderId,String bhrId);

    private final String msg;

    public static Case valueOf(String msg, int overload) {
        for(Case week : Case.values()) {
            if (week.getMsg().equalsIgnoreCase(msg)) {
                return week;
            }
        }
        return Case.DEFAULT;
    }

    public String getMsg() {
        return msg;
    }

    Case(String msg) {
        this.msg = msg;
    }


}
